<?php 
error_reporting(0); 
$isadmin=1;
include_once '../../comm/config.php';
include '../check.php';
include('../../comm/class_db.php');
include_once '../include/page.class.php';
$link = mysql_connect($dbserver, $dbuser, $dbpass);
mysql_query("set names utf8");	
mysql_select_db($dbname);

$keyword=$_GET['keyword']; 
$page = !($_GET['page'])?'1':intval($_GET['page']);
$pagesize=10;
$page2=($page-1)*$pagesize;

$total=sql_count("mall_comment","id",1,1," and `mall_name` like '%".$keyword."%'");
	
$sql="select * from ".$BIAOTOU."mall_comment where (mall_name like '%".$keyword."%') order by time desc limit $page2,$pagesize";
$rs = mysql_query($sql);
mysql_close($link);	
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>评论管理</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
.STYLE2 {
	color: #555555;
	font-weight: bold;
	font-size:14px;
	text-decoration:none;
}
-->
</style>
<script language="javascript" type="text/javascript">
</script>
</head>

<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <form id="form1" name="form1" method="get" action="">
              <td width="479" align="left" bgcolor="E9F2FB" class="bigtext">商城名
                  <input type="text" class="button3" name="keyword" />
                <input type="submit" name="Submit" value="查找" />
                </td></form>
				<td bgcolor="E9F2FB" class="bigtext"></td>
              <td width="130" height="30" align="right" bgcolor="E9F2FB" class="bigtext">共有 <b><?php echo $num;?></b> 条记录&nbsp;&nbsp;</td>
            </tr>
            <tr>
              <td colspan="3" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><table width="100%" border=1 cellpadding=0 cellspacing=0
style="border-collapse: collapse" bordercolor="#dddddd">
                    <tr>
                      <td width="8%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>商城名</strong></td>
                      <td width="8%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>会员名</strong></td>
                      <td width="7%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>综合评价</strong></td>
					  <td width="7%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>质量评价</strong></td>
                      <td width="7%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>价格评价</strong></td>
                      <td width="7%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>送货评价</strong></td>                      
                      <td width="7%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>售后评价</strong></td>
                      <td width="9%" height="30" align=center bgcolor="#F2F2F2" class="bigtext"><strong>时间</strong></td>
					  <td width="" height="30" align=center bgcolor="#F2F2F2" class="bigtext"><strong>评论内容</strong></td>
                      <td width="9%" height="30" align="center" bgcolor="#F2F2F2" class="bigtext"><strong>执行操作</strong></td>
                    </tr>
                    <?php
					while ($row = mysql_fetch_array($rs))
					{?>
						<tr>
                      	<td height=30 align="center" class=bigtext><a href="mallmodify.php?id=<?=$row["mall_id"]?>"><?=$row["mall_name"]?></a></td>
                      	<td height=30 align="center" class=bigtext><a href="chguser.php?id=<?=$row["user_id"]?>"><?=$row["user_name"]?></a></td>
						<td class=bigtext align=center><?=$row["zhpj"]?>星</td>
						<td class=bigtext align=center><?=$row["zlpj"]?>星</td>
						<td class=bigtext align=center><?=$row["jgpj"]?>星</td>
						<td class=bigtext align=center><?=$row["shpj"]?>星</td>
						<td class=bigtext align=center><?=$row["shhpj"]?>星</td>					
						<td class=bigtext align=center><?=date("Y-m-d",strtotime($row["time"]))?></td>
						<td align="center" class=bigtext><?=$row["content"]?></td>
						<td align=center class=bigtext><a href=../mall.php?id=<?=$row["mall_id"]?>#<?=$row["id"]?> target=_blank class=link4>查看</a> | <a href=admin.php?action=del.php&table=mall_commentid=<?=$row["id"]?> onclick='return confirm("确定删除?")' class=link4>删除</a></td>
						</tr>
					<?php }
					?>
                    <tr>
                      <td height="43" colspan="11" align="center"><div id="pages">
                          <?php  
require_once("../comm/pages.php"); $page_size=10;    
  $nums=$num;     
  $sub_pages=10;   
  $pageCurrent=$_GET["page"]; $subPages=new SubPages($page_size,$nums,$pageCurrent,$sub_pages,"admin.php?action=mall_comment&keyword=".$kword."&page=",2);
?>
                      </div></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
</body>
</html>
